Crate bevy_spectator

source ·
Expand description

§Bevy Spectator

crates.io crates.io docs.rs

A spectator camera plugin for the Bevy game engine.

§Controls

ActionKey
ForwardW
LeftA
BackwardS
RightD
UpSpace
DownControlLeft
Alternative SpeedShiftLeft
Release CursorEscape

Movement is constrained to the appropriate axes. (WASD to X & Z axes, Space & ShiftLeft to the Y axis)

When in orthographic mode, only WASD is used.

§Basic example

use bevy::prelude::*;
use bevy_spectator::*;

fn main() {
    App::new()
        .add_plugins((DefaultPlugins, SpectatorPlugin))
        .add_systems(Startup, setup)
        .run();
}

fn setup(mut commands: Commands) {
    commands.spawn((
        Camera3dBundle::default(), Spectator
    ));
}

§Bevy compatibility

bevybevy_spectator
0.130.5
0.120.4
0.110.3
0.100.2
0.90.1

Structs§